<<<<<<< HEAD
<!--  -->
<template>
  <el-container>
    <el-header>
      关键字:<el-input
        class="search"
        type="text"
        placeholder="请输入内容"
        v-model="text"
      ></el-input>
      所属角色:<el-select class="search" v-model="belongRole" placeholder="请选择">
        <el-option
          v-for="item in belongRoleArr"
          :key="item.JSvalue"
          :label="item.JSlabel"
          :value="item.JSvalue"
          size="mini"
        >
        </el-option>
      </el-select>
    </el-header>
    <el-main>
      <el-row>
        <el-button @click="centerDialogVisible = true" type="primary" plain>添加</el-button>
        <el-button @click="psyDelBut()" type="danger" plain>删除</el-button>
      </el-row>
      <Maintable :tableData="belongRoleArr">
        <template v-slot:tableline>
          <el-table-column prop="JSvalue" label="登录账号" width="180"> </el-table-column>
          <el-table-column prop="JSlabel" label="真实姓名" width="180"> </el-table-column>
          <el-table-column prop="date" label="所属角色" width="180"> </el-table-column>
        </template>
        <template v-slot:chaozuo>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                type="primary"
                plain
                icon="el-icon-edit"
                title="编辑"
                @click="updates(scope.row.id)"
              ></el-button>
              <el-button
                type="danger"
                plain
                icon="el-icon-key"
                title="重置密码"
                @click="
                  deletes(scope.row.id);
                  psyDelBut();
                "
              ></el-button>
            </template>
          </el-table-column>
        </template>
      </Maintable>
    </el-main>
    <el-footer>
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage"
          :page-sizes="[6, 8, 10, 12]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
        >
        </el-pagination>
      </div>
    </el-footer>
  </el-container>
</template>

<script>
import Maintable from "../components/main/Maintable";
export default {
  name: "Mianxitong",
  components: {
    Maintable,
  },
  computed: {},
  data() {
    return {
      size: 6,
      page: 1,
      total: 0,
      currentPage: 1,
      text: "",
      belongRole: "",
      belongRoleArr: [
        {
          JSvalue: "选项1",
          JSlabel: "操作员",
        },
        {
          JSvalue: "选项2",
          JSlabel: "管理员",
        },
        {
          JSvalue: "选项3",
          JSlabel: "超级管理员",
        },
      ],
    };
  },
  methods: {
    handleSizeChange(val) {
      this.size = val;
      console.log(`每页 ${val} 条`);
      this.selects();
    },
    handleCurrentChange(val) {
      this.page = val;
      console.log(`当前页: ${val}`);
      this.selects();
    },
    updates(id) {
      console.log(id);
    },
    psyDelBut() {
      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    deletes(id) {
      console.log(id);
      // this.$axios({
      //   method: "post",
      //   url: "http://",
      //   data: { id },
      // }).then((data) => {
      //   // arr=data.toArray;
      // });
    },

    handleSizeChange(val) {
      this.size = val;
      console.log(`每页 ${val} 条`);
      this.selects();
    },
    handleCurrentChange(val) {
      this.page = val;
      console.log(`当前页: ${val}`);
      this.selects();
    },
    //获取页面数据
    selects() {
      // console.log(this.text);
      this.$axios({
        method: "post",
        url: "/xiaoucomeshome_war/admin/selectCourier",
        data: {
          phone: this.text,
          page: this.page,
          size: this.size,
          state: this.peiSongYuanZhuangTai,
        },
      })
        .then((response) => {
          this.total = response.data.total;
          this.peisongyuanArr = response.data.data;
          // console.log(response.data);
        })
        .catch((error) => {
          console.log(error);
        });
    },
  },
};
</script>

<style lang="less" scoped>
.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.block {
  margin: 0 150px;
  float: right;
}
</style>
=======
<!--  -->
<template>
  <el-container>
    <el-header>
      关键字:<el-input
        class="search"
        type="text"
        placeholder="请输入内容"
        v-model="text"
      ></el-input>
      所属角色:<el-select class="search" v-model="belongRole" placeholder="请选择">
        <el-option
          v-for="item in belongRoleArr"
          :key="item.JSvalue"
          :label="item.JSlabel"
          :value="item.JSvalue"
          size="mini"
        >
        </el-option>
      </el-select>
    </el-header>
    <el-main>
      <el-row>
        <el-button @click="centerDialogVisible = true" type="primary" plain>添加</el-button>
        <el-button @click="psyDelBut()" type="danger" plain>删除</el-button>
      </el-row>
      <Maintable :data="belongRoleArr">
        <template v-slot:tableline>
          <el-table-column prop="JSvalue" label="登录账号" width="180"> </el-table-column>
          <el-table-column prop="JSlabel" label="真实姓名" width="180"> </el-table-column>
          <el-table-column prop="date" label="所属角色" width="180"> </el-table-column>
        </template>
        <template v-slot:chaozuo>
          <el-table-column label="操作">
            <template slot-scope="scope">
              <el-button
                type="primary"
                plain
                icon="el-icon-edit"
                title="编辑"
                @click="updates(scope.row.id)"
              ></el-button>
              <el-button
                type="danger"
                plain
                icon="el-icon-key"
                title="重置密码"
                @click="
                  deletes(scope.row.id);
                  psyDelBut();
                "
              ></el-button>
            </template>
          </el-table-column>
        </template>
      </Maintable>
    </el-main>
    <el-footer>
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="currentPage4"
          :page-sizes="[6, 8, 10, 12]"
          :page-size="100"
          layout="total, sizes, prev, pager, next, jumper"
          :total="100"
        >
        </el-pagination>
      </div>
    </el-footer>
  </el-container>
</template>

<script>
import Maintable from "../components/main/Maintable";
export default {
  name: "Mianxitong",
  components: {
    Maintable,
  },
  computed: {},
  data() {
    return {
      text: "",
      belongRole: "",
      belongRoleArr: [
        {
          JSvalue: "选项1",
          JSlabel: "操作员",
        },
        {
          JSvalue: "选项2",
          JSlabel: "管理员",
        },
        {
          JSvalue: "选项3",
          JSlabel: "超级管理员",
        },
      ],
    };
  },
  methods: {
    updates(id) {
      console.log(id);
    },
    psyDelBut() {
      this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
    deletes(id) {
      console.log(id);
      // this.$axios({
      //   method: "post",
      //   url: "http://",
      //   data: { id },
      // }).then((data) => {
      //   // arr=data.toArray;
      // });
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
  data() {
    return {
      currentPage1: 5,
      currentPage2: 5,
      currentPage3: 5,
      currentPage4: 4,
    };
  },
};
</script>

<style lang="less" scoped>
.search {
  margin: 10px 40px 0 20px;
  width: 20%;
}
.block {
  margin: 0 50px;
  float: right;
}
</style>
>>>>>>> ae27e4fe2d4f939d0b0ee2bfa506b9e3269c53cb
